// 云函数入口文件
const cloud = require('wx-server-sdk');
cloud.init({
  env: 'womenlia-2gcdym6fb861b775'
})
const db = cloud.database()
// 云函数入口函数
exports.main = async (event, context) => {
  const wxContext = cloud.getWXContext()
  console.log(event);
  //查询积分商品
 let jfshangpin = await db.collection('shangpin').get()
 console.log(jfshangpin);
let youhuijua = await db.collection('yhj').get();
console.log(youhuijua);
  return {
   jf:jfshangpin.data,
   yhj:youhuijua.data
  }
}